home *** CD-ROM | disk | FTP | other *** search
/ Network Support Library / RoseWare - Network Support Library.iso / hardware / netvid.arc / NETVID.DOC next >
Text File  |  1989-10-23  |  14KB  |  356 lines

  1.                           NETWORK VIDEO IDENTIFIER
  2.                                    v 1.10 
  3.                       Copyright 1989 by Brad Stephenson
  4.     
  5.  
  6.   GENERAL
  7.   -------
  8.     
  9.     NETVID is a utility program designed for use on Local Area Networks. 
  10.     Depending on the application programs run by the workstations, NETVID 
  11.     may eliminate the need for hardware configuration files for each 
  12.     workstation.  
  13.  
  14.     NETVID detects the video adapter hardware and current screen settings 
  15.     in a workstation.  It then places information in the workstation's 
  16.     parent DOS environment.  The environment information can be used to 
  17.     build configuration file names for several popular application 
  18.     programs. 
  19.     
  20.     For example, NETVID's environment information can be used to build a 
  21.     Lotus 1-2-3 .SET filename, dynamically configuring 1-2-3 to match the 
  22.     workstation's current video parameters. 
  23.  
  24.     NETVID auto-detects the workstation's video hardware adapter, the 
  25.     current number of screen columns, and the current number of screen 
  26.     rows.  It then generates three environment variables: 
  27.     
  28.               NVADP - Video adapter hardware present
  29.               NVCOL - Number of columns on display
  30.               NVROW - Number of rows on display
  31.  
  32.         
  33.     Some of the new VGA video boards come with a configuration program 
  34.     that allows you to set certain emulations such as CGA, Hercules, etc.  
  35.     NETVID will correctly detect the emulation mode, not simply the VGA 
  36.     hardware presence. 
  37.     
  38.     NETVID's auto-detection of the video adapter can be overridden by 
  39.     command line option switches.  This type of override would be used if 
  40.     the workstation has a single-color display (e.g. an LCD), but has a 
  41.     CGA-compatible video adapter.  The auto-detected number of columns 
  42.     and rows can also be overridden by command line switches.  The Test 
  43.     Mode option ('/t') causes NETVID to display the result of its auto-
  44.     detection and any command line overrides. 
  45.     
  46.     The workstation must have at least 30 bytes of free environment space 
  47.     for the NETVID variables.  See your DOS manual for information 
  48.     regarding the expansion of environment size (look at the /E: option 
  49.     in the COMMAND.COM description). 
  50.  
  51.     Secondary COMMAND processes (as in a 'Drop to DOS' mode from an 
  52.     application), do not allow expansion of the parent's DOS environment; 
  53.     NETVID won't have enough room to add its variables.  If you plan to 
  54.     run NETVID in a secondary COMMAND process, reserve adequate 
  55.     environment space by executing NETVID in the workstation's 
  56.     AUTOEXEC.BAT. 
  57.     
  58.     A non-zero DOS ERRORLEVEL is returned if problems are detected during 
  59.     NETVID execution.  The return values can be used by a batch file to 
  60.     present custom error messages to network users. 
  61.  
  62.                                  NETVID 1.10 
  63.                                     Page 2
  64.     
  65.   INVOKING NETVID
  66.   ---------------
  67.         
  68.     To call NETVID from the DOS command line or from a batch file, use 
  69.     the following syntax: 
  70.  
  71.        NETVID [options] 
  72.         
  73.         Options:
  74.            
  75.            /a - Overrides auto-detection of video adapter.
  76.                 Single-color CGA system such as a laptop 
  77.                 or Compaq portables should use '/aLCD'.
  78.                 Valid override values:
  79.  
  80.                      MDA       -Monochrome Display Adapter
  81.                      CGA       -Color Graphics Adapter
  82.                      MCGA      -Multi-color Graphics Adapter (PS/2)
  83.                      EGA       -Enhanced Graphics Adapter
  84.                      EGA64     -Enhanced Graphics Adapter (with memory upgrade)
  85.                      EGAMONO   -EGA driving monochrome display
  86.                      8514      -IBM 8514-compatible adapter (PS/2)
  87.                      HERCMONO  -Hercules Monochrome Graphics Card
  88.                      ATT400    -AT&T 400-line Color Graphics Adapter
  89.                      VGA       -Video Graphics Array
  90.                      PC3270    -IBM PC3270
  91.                      LCD       -Single-color CGA compatible
  92.            
  93.            /c - Overrides auto-detection of the number of screen
  94.                 columns.  The first 3 digits of the option 
  95.                 argument are placed in the environment 
  96.                 variable NVCOL.
  97.            
  98.            /r - Overrides auto-detection of the number of screen
  99.                 rows.  The first 2 digits of the option argument
  100.                 are placed in the environment variable NVROW.
  101.  
  102.            /t - Test Mode.  NETVID will generate and display
  103.                 the three environment variables WITHOUT adding
  104.                 them to the DOS environment.
  105.  
  106.                               
  107.                                 
  108.                                ***  NOTE:  ***
  109.              Option arguments must immediately follow options and 
  110.              must be white-space delimited (see examples). 
  111.  
  112.  
  113.     EXAMPLES:
  114.     
  115.         NETVID /aLCD /c132 /r43 /t 
  116.     
  117.         NETVID /r50 /c80
  118.  
  119.                                  NETVID 1.10 
  120.                                     Page 3
  121.  
  122.  
  123.   DOS ERRORLEVEL RETURNS
  124.   ----------------------
  125.  
  126.     1.  If NETVID successfully executed:
  127.  
  128.                  o DOS Errorlevel of 0
  129.                     
  130.                    - If the /t option was specified, ERRORLEVEL 
  131.                      will always be zero.
  132.  
  133.                  o DOS Environment variable NVADP set to:
  134.                                                                            
  135.                         00 - MDA
  136.                         01 - CGA
  137.                         02 - MCGA
  138.                         03 - EGA
  139.                         04 - EGA64
  140.                         05 - EGAMONO
  141.                         06 - 8514
  142.                         07 - HERCMONO
  143.                         08 - ATT400
  144.                         09 - VGA
  145.                         10 - PC3270
  146.                         11 - LCD
  147.                  
  148.                  o DOS Environment variable NVCOL set to current number
  149.                    of screen columns (or value from '/c' override).
  150.     
  151.                  o DOS Environment variable NVROW set to current number
  152.                    of screen rows (or value from '/r' override).
  153.                                                                              
  154.     
  155.     2.  If NETVID detected an error while executing:
  156.  
  157.                  o DOS ERRORLEVEL indicates error condition found:
  158.     
  159.                      1 - DOS not version 2.0 or higher
  160.                      2 - Insufficient room in environment for variables
  161.                      3 - Internal NETVID error (bad environment string built)
  162.                      4 - DOS environment corrupted before variables added
  163.                      5 - Invalid NETVID command line option
  164.  
  165.         
  166.     The utility RETURN (included in the NETVID distribution archive) allows 
  167.     users to call NETVID and see the resulting DOS ERRORLEVEL return code.  
  168.     Refer to the file RETURN.DOC for program syntax. 
  169.  
  170.                                  NETVID 1.10 
  171.                                     Page 4
  172.  
  173.  
  174.  
  175.   NETWORK USAGE EXAMPLE
  176.   ---------------------
  177.  
  178.     In this example, a workstation will be executing Lotus 1-2-3 from a 
  179.     workstation and NETVID will be used to select the correct 1-2-3 .SET 
  180.     file matching the video parameters of the workstation.
  181.  
  182.     Before attempting to execute 1-2-3 using NETVID variables, the 
  183.     Network System Administrator must set up several 1-2-3 configuration 
  184.     files (.SET files).  One .SET is created for each unique workstation 
  185.     hardware configuration. 
  186.     
  187.     1-2-3 configuration files would use the following naming convention: 
  188.  
  189.                  aacccrr.SET
  190.                  \/\ /\/
  191.                  |  | |
  192.                  |  | Number of screen rows
  193.                  |  |
  194.                  |  Number of screen columns
  195.                  |
  196.                  Video adapter type
  197.  
  198.     
  199.     A CGA 80x25 configuration file would, for example, be named 0108025.SET. 
  200.     One for VGA 132x80 would be named 0913280.SET.
  201.  
  202.         
  203.    THE NETWORK LOTUS 1-2-3 BATCH FILE
  204.    ----------------------------------
  205.  
  206.     The Network System Administrator then sets up a batch file that users 
  207.     call when they want to run 1-2-3.  When the user request for 1-2-3 is 
  208.     detected by the file server, the batch file calls NETVID, then 1-2-3.
  209.     An example batch file named RUN123.BAT follows. 
  210.  
  211.          ECHO OFF
  212.          CLS
  213.          NETVID %1 %2 %3 %4
  214.          IF ERRORLEVEL 1 GOTO ERR
  215.          123 %NVADP%%NVCOL%%NVROW%.SET
  216.          GOTO END
  217.          :ERR
  218.            .
  219.            .    [We'll cover error handling later]
  220.            .
  221.          :END
  222.     
  223.  
  224.                                  NETVID 1.10 
  225.                                     Page 5
  226.  
  227.  
  228.     For our example, we'll use a workstation that has an EGA video adapter
  229.     driving an EGA monitor.  Although the user wants to use a 132x43 video
  230.     driver, the workstation is currently in DOS (80x25).  NETVID will 
  231.     auto-detect the EGA adapter and set NVADP=03.  Since the current 
  232.     display mode is not 132x43, the user requests a higher resolution 
  233.     mode to override the auto-detection of the current 80x25 mode.
  234.  
  235.     At the workstation, the user types:
  236.  
  237.                     RUN123 /c132 /r43
  238.  
  239.     The file server responds by sending RUN123.BAT down to the 
  240.     workstation for execution.  The batch file executes, calling for 
  241.     NETVID from the server.  NETVID executes at the workstation, 
  242.     receiving the two command line parameters '/c132' and '/r43.'
  243.  
  244.     NETVID places three environment variables into the parent DOS 
  245.     environment of the workstation.  If we stopped execution of the batch 
  246.     file at this point and typed SET at the DOS prompt, the last three 
  247.     statements would be:
  248.  
  249.                     NVADP=03
  250.                     NVCOL=132
  251.                     NVROW=43
  252.  
  253.     After executing NETVID, the batch file calls 1-2-3, using the three 
  254.     environment variables to build a 1-2-3 .SET file name that matches 
  255.     the workstation's video hardware and the user's desired video mode.
  256.  
  257.     The batch file line:  123 %NVADP%%NVCOL%%NVROW%.SET
  258.     is replaced with   :  123 0113280.SET
  259.  
  260.     1-2-3 comes up in the video mode that correctly matches the 
  261.     workstation's hardware and the row/column overrides specified by the 
  262.     user.
  263.  
  264.  
  265.                                  NETVID 1.10 
  266.                                     Page 6
  267.  
  268.  
  269.   ERROR HANDLING
  270.   --------------
  271.  
  272.     Network batch files calling NETVID should include error handling.  
  273.     NETVID returns DOS ERRORLEVEL codes for several types of errors, 
  274.     allowing customized prompts to be displayed to network users.
  275.  
  276.     A completed RUN123.SET file may look like this:
  277.  
  278.          ECHO OFF
  279.          CLS
  280.          NETVID %1 %2 %3 %4
  281.          IF ERRORLEVEL 1 GOTO ERR
  282.          IF NOT EXIST \LOTUS\%NVADP%%NVCOL%%NVROW%.SET GOTO BADSET
  283.          123 %NVADP%%NVCOL%%NVROW%.SET
  284.          GOTO END
  285.          :ERR
  286.          IF ERRORLEVEL 5 GOTO BADOPT
  287.          IF ERRORLEVEL 4 GOTO BADENV
  288.          IF ERRORLEVEL 3 GOTO BADENV
  289.          IF ERRORLEVEL 2 GOTO NOROOM
  290.          ECHO You must boot with DOS 2.0 or higher to run 1-2-3!
  291.          GOTO END
  292.          :NOROOM
  293.          ECHO No room in your workstation's environment!
  294.          ECHO Remove unneccessary environment variables before continuing.
  295.          GOTO HELP
  296.          :BADENV
  297.          ECHO Technical difficulties...
  298.          ECHO Please reboot your workstation and try again.
  299.          GOTO HELP
  300.          :BADOPT
  301.          ECHO You entered an unsupported option.
  302.          ECHO The options you entered: %1 %2 %3 %4
  303.          ECHO Please consult your Network User's Manual.
  304.          GOTO HELP
  305.          :BADSET
  306.          ECHO %NVCOL% columns by %NVROW% rows is not supported by the network.
  307.          ECHO Please consult your Network User's Manual
  308.          :HELP
  309.          ECHO For further assistance, call extension 1234
  310.          :END
  311.  
  312.     
  313.                                  NETVID 1.10 
  314.                                     Page 7
  315.  
  316.  
  317.   REVISION HISTORY
  318.   ----------------
  319.  
  320.     Version 1.00 
  321.     10/15/89      Original release.
  322.  
  323.     Version 1.01
  324.     10/18/89      Added check and special environment handling for 3.2x 
  325.                   versions of DOS.  Removed requirement that NETVID be
  326.                   executed from primary COMMAND process only.  NETVID
  327.                   now properly handles secondary COMMAND processes.             
  328.  
  329.     Version 1.10
  330.     10/22/89      Corrected problem seen in auto-detect of video systems
  331.                   already in a 132-column mode (NETVID was writing garbage
  332.                   to the environment).
  333.  
  334.                                          
  335.  
  336.   
  337.     NETVID v1.10 has no registration fees nor does it require a software
  338.     license.  The author reserves all rights to NETVID.  It may not be 
  339.     sold for a profit, but may be included (free of charge) with software 
  340.     that is sold for a profit as long as this documentation file 
  341.     accompanies the program.  
  342.  
  343.     If using NETVID saves you a lot of time (i.e. money) and you feel 
  344.     generous, send no more than $10.00 to the address listed below.  
  345.     Please feel free to comment on NETVID and/or offer suggestions for 
  346.     other utilities you would like to have!
  347.   
  348.   
  349.  
  350.                                Brad Stephenson
  351.                                 670 Edgeworth
  352.                               Jenison, MI  49428
  353.                           Compuserve ID  71620,1035
  354.  
  355.  
  356.